package com.wxp.cloud.live.config;

import com.wxp.cloud.live.mtcloud.MTCloud;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.stereotype.Component;

/**
 * 欢拓云直播配置类
 *
 * @author wxp
 */
@Component
public class MTCloudConfig {

    @Autowired
    private MTCloudAccountProperties mtCloudAccountConfig;

    /**
     * 注入客户端对象
     *
     * @return
     */
    @Bean
    public MTCloud mtCloudClient() {
        return new MTCloud(mtCloudAccountConfig.getOpenId(), mtCloudAccountConfig.getOpenToken());
    }
}
